package com.huawei.appgallery.wishwall.ui.cardkit.card;

import android.content.Context;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.wishwall.ui.cardkit.bean.WishWallDeleteCardBean;
import java.text.SimpleDateFormat;
import java.util.Locale;
import o.cgz;
import o.ddq.d;
import o.ddq.f;

public class WishWallDeleteCard extends cgz {
    private TextView ˋ;
    private TextView ˎ;
    private CheckBox ˏ;
    private View ॱ;

    public WishWallDeleteCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ॱ((TextView) view.findViewById(d.ˊˋ));
        this.ˋ = (TextView) view.findViewById(d.ˈ);
        this.ˎ = (TextView) view.findViewById(d.ᐝ);
        this.ˏ = (CheckBox) view.findViewById(d.ʿ);
        this.ॱ = view.findViewById(d.ॱˊ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (ˊᐝ()) {
            this.ॱ.setVisibility(0);
        } else {
            this.ॱ.setVisibility(4);
        }
        WishWallDeleteCardBean wishWallDeleteCardBean = (WishWallDeleteCardBean) cardBean;
        this.ʿ.setVisibility(0);
        this.ʿ.setText(wishWallDeleteCardBean.v_());
        String ˊ = ˊ(wishWallDeleteCardBean.ॱ());
        this.ˋ.setText(this.ʼॱ.getString(f.ᐝॱ, new Object[]{ˊ}));
        this.ˎ.setText(this.ʼॱ.getString(f.ॱˋ, new Object[]{wishWallDeleteCardBean.ᐝ()}));
        this.ˏ.setChecked(wishWallDeleteCardBean.ˊ());
    }

    private String ˊ(long j) {
        if (j == 0) {
            return "";
        }
        return new SimpleDateFormat("yyyy/M/d", Locale.getDefault()).format(Long.valueOf(j));
    }
}
